package com.github.phoenics.teacher.itheima.netty.jdkSerializable;

/**
 * @author Phoenics Chow
 * on 2020年02月16日
 */
public class Main {

    public static void main(String[] args) {

        //序列化
        Person person = new Person();
        person.setName("混世魔王");
        person.setSinglehood(true);
        SerializationUtil.writeObject(person);

        Person p = (Person) SerializationUtil.readObject();
        System.out.println("name = " + p.getName());
        System.out.println("singlehood = " + p.isSinglehood());
    }

}